import http from '@/utils/http/axios';

/**
 * @description: 根据用户id获取用户菜单
 */
export function adminMenus() {
  return http.request({
    url: '/sys/menu/queryRouter',
    method: 'GET',
  });
}

/**
 * 获取tree菜单列表
 * @param params
 */
export function getMenuList(params) {
  return http.request({
    url: '/sys/menu/queryMenuList',
    method: 'GET',
    params,
  });
}
export function querySelectMenu(params) {
  return http.request({
    url: '/sys/menu/querySelectMenu',
    method: 'GET',
    params
  });
}
export function saveMenu(data){
  return http.request({
    url: '/sys/menu',
    method:'POST',
    data
  })
}
export function updateMenu(data){
  return http.request({
    url:'/sys/menu',
    method:'PUT',
    data
  })
}
export function removeMenu(ids){
  return http.request({
    url:`/sys/menu/${ids}`,
    method:'delete'
  })
}
